<?php

namespace App\Hospital\Controllers;

use App\Models\Hospital;
use Dcat\Admin\Admin;

class Dashboard
{
    public static function title()
    {
        $hospital = Hospital::query()->where('id', Admin::user()->hospital_id)->first();
        $links = isset($hospital->links) ?json_decode($hospital->links, true): [];

        return view('hospital.title', ["hospital" => $hospital, 'links' => $links]);
    }
}
